package com.qf.serviceimpl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsUserMapper;
import com.qf.pojo.DtsUser;
import com.qf.service.DtsUserService;
import com.qf.vo.UserCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Ypl
 * @version V1.0
 * @Project September-mavens
 * @Package com.qf.serviceimpl
 * @Description:
 * @Date 2022/10/13 20:16
 */
@Service
public class DtsUserServiceImpl implements DtsUserService {
    @Autowired
    DtsUserMapper dtsUserMapper;

    @Override
    public long getCount() {

        LambdaQueryWrapper<DtsUser> wrapper = new LambdaQueryWrapper<>();

        wrapper.eq(DtsUser::getDeleted,false);

        return dtsUserMapper.selectCount(wrapper);
    }

    @Override
    public List<UserCountVo> findUser() {
        return dtsUserMapper.findUser();
    }


}
